home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12964 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  926 b 

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can anyone HELP with variable delaration? Please?
  5. Date: 3 Apr 1996 10:12:36 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4juf2kINNe9v@keats.ugrad.cs.ubc.ca>
  8. References: <4jt07b$dul@news.us.net> <3162119a.43634755@news.ucs.ubc.ca>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <3162119a.43634755@news.ucs.ubc.ca>,
  12. James Fairweather <jamesdf@unixg.ubc.ca> wrote:
  13.  
  14. >Here's a little hint about C, though: avoid strings like Ebola!  Only
  15. >use strings when it's really necessary to use strings; otherwise use
  16. >constants or integers.
  17.  
  18. ?
  19.  
  20. Any variable can be declared constant, including strings:
  21.  
  22.     const char * const str = "Foo";
  23.  
  24. Or do you mean literal constants?
  25.  
  26. In what way are integers a suitable alternative representation for string data?
  27. -- 
  28.  
  29.